require('../pages/home/font_385/iconfont.css');
require('../assets/iconfont/iconfont/iconfont.css')
function renderTabbar() {
    // 获取当前地址
   
      console.log(location.pathname);
    let arr = [
        {
            path: './home.html',
            title: '首页', 
            icon: 'icon-shouye',
        }, {
            path: './run.html',
            title: '运动',
            icon: 'icon-24gl-heartPulse',

        }, {
            path: './circle.html',
            title: '圈子',
            icon: 'icon-pintu',

        },
        {
            path: './mine.html',
            title: '我的',
            icon: 'icon-wode-',

        }

    ]
    
    let html = `
    ${arr.map((v, i) => {
        return ` 
    <div class="foot df jcsb">
    <a href="./${v.path}" class="foot1 df fdc aic jcsa ${v.path==='.'+location.pathname&&'gon'}">
    
      <div class="iconfont ${v.icon}"></div> 
      <p class='manm'>${v.title}</p>
    </a>
    </div>
    `
    }).join('') }
  
    `

    let div = document.createElement('div')
    div.className = 'foot df jcsb' 
    div.innerHTML = html
    document.body.appendChild(div)
}
// 导出
module.exports = renderTabbar